home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Applications 1999 May / SGI IRIX 6.5 Applications 1999 May.iso / dist / arraysvcs.idb / usr / share / catman / p_man / cat3x / asrcmd.z / asrcmd
Text File  |  1998-10-27  |  7KB  |  133 lines

  1.  
  2.  
  3.  
  4. aaaassssrrrrccccmmmmdddd((((3333xxxx))))                                                          aaaassssrrrrccccmmmmdddd((((3333xxxx))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      asrcmd, asrcmdv - execute a command on a remote machine
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<aaaarrrrrrrraaaayyyyssssvvvvccccssss....hhhh>>>>
  13.  
  14.      iiiinnnntttt aaaassssrrrrccccmmmmdddd((((aaaasssssssseeeerrrrvvvveeeerrrr____tttt SSSSeeeerrrrvvvveeeerrrr,,,, cccchhhhaaaarrrr ****UUUUsssseeeerrrr,,,, cccchhhhaaaarrrr ****CCCCmmmmddddLLLLiiiinnnneeee,,,, iiiinnnntttt ****ffffdddd2222pppp))));;;;
  15.      iiiinnnntttt aaaassssrrrrccccmmmmddddvvvv((((aaaasssssssseeeerrrrvvvveeeerrrr____tttt SSSSeeeerrrrvvvveeeerrrr,,,, cccchhhhaaaarrrr ****UUUUsssseeeerrrr,,,, cccchhhhaaaarrrr ********CCCCmmmmddddVVVV,,,, iiiinnnntttt ****ffffdddd2222pppp))));;;;
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      The _a_s_r_c_m_d and _a_s_r_c_m_d_v functions are used to execute an arbitrary command
  19.      on a remote machine.  They are similar in some respects to _r_c_m_d(3N)
  20.      except that the connection and user authentication is provided by Array
  21.      Services, so the user does not necessarily have to have root privileges.
  22.      Both _a_s_r_c_m_d and _a_s_r_c_m_d_v pass the command to the remote user's default
  23.      shell for execution using the standard shell command line option "-c".
  24.      For example, if the requested command is _llll_ssss _----_llll and the remote user's
  25.      shell is _////_bbbb_iiii_nnnn_////_tttt_cccc_ssss_hhhh, then the following command would be invoked on the
  26.      remote machine:
  27.  
  28.           _////_bbbb_iiii_nnnn_////_tttt_cccc_ssss_hhhh _----_cccc _""""_llll_ssss _----_llll_""""
  29.  
  30.      The only difference between _a_s_r_c_m_d and _a_s_r_c_m_d_v is in the way that the
  31.      remote command is specified.
  32.  
  33.      The SSSSeeeerrrrvvvveeeerrrr argument is an array server token created with
  34.      _a_s_o_p_e_n_s_e_r_v_e_r(3X) that specifies the remote machine that is to execute the
  35.      command.  If NULL is specified instead, the command will be executed on
  36.      the same machine as the one running the default array services daemon,
  37.      though this is not generally very useful.  See _a_r_r_a_y(1) for more
  38.      information on how the default array services daemon is selected.
  39.  
  40.      The UUUUsssseeeerrrr argument specifies the login name of the user on the remote
  41.      machine that should execute the command.  Specifying NULL will cause the
  42.      command to be executed using the same user login name as the one
  43.      executing _a_s_r_c_m_d/_a_s_r_c_m_d_v.  Authorization for the local user to execute
  44.      commands as user UUUUsssseeeerrrr on the remote machine is determined with
  45.      _r_u_s_e_r_o_k(3N), the same mechanism used by _r_s_h(1) and _r_c_m_d(3N) that involves
  46.      checking for the user in _////_eeee_tttt_cccc_////_hhhh_oooo_ssss_tttt_ssss_...._eeee_qqqq_uuuu_iiii_vvvv and/or _~~~~_////_...._rrrr_hhhh_oooo_ssss_tttt_ssss.
  47.  
  48.      The CCCCmmmmddddLLLLiiiinnnneeee argument to _a_s_r_c_m_d is a single string containing the entire
  49.      command to be executed, such as it might be typed on the command line.
  50.  
  51.      The CCCCmmmmddddVVVV argument to _a_s_r_c_m_d_v is an argv-style array of string pointers
  52.      containing the list of arguments that make up the command to be executed.
  53.      The array should be terminated with a NULL pointer.  Note that the list
  54.      of arguments will be concatenated into a single string (with a single
  55.      space between each) before it is passed to the remote user's default
  56.      shell for execution.  It may therefore be necessary to include
  57.      appropriate shell quote characters if individual arguments contain
  58.      embedded space or tab characters.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaassssrrrrccccmmmmdddd((((3333xxxx))))                                                          aaaassssrrrrccccmmmmdddd((((3333xxxx))))
  71.  
  72.  
  73.  
  74.      If the remote command is successfully initiated, a socket in the internet
  75.      domain of type SOCK_STREAM is returned to the caller and given to the
  76.      remote command as _s_t_d_i_n and _s_t_d_o_u_t.  If ffffdddd2222pppp is non-zero, then an
  77.      auxillary channel to a control process will be set up, and a descriptor
  78.      for it will be placed in ****ffffdddd2222pppp.  The control process will return output
  79.      from the command's _s_t_d_e_r_r, and will also accept bytes on this channel as
  80.      being UNIX signal numbers, to be forwarded to the process group of the
  81.      command.  If ffffdddd2222pppp is 0, then the _s_t_d_e_r_r of the remote command will be
  82.      made the same as the _s_t_d_o_u_t and no provision is made for sending
  83.      arbitrary signals to the remote process.
  84.  
  85. NNNNOOOOTTTTEEEESSSS
  86.      _a_s_r_c_m_d and _a_s_r_c_m_d_v are found in the library "libarray.so", and will be
  87.      loaded if the option "-larray" is used with _c_c(1) or _l_d(1).
  88.  
  89. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  90.      array(1), ascommand(3X), aserrorcode(3X), asopenserver(3X), rcmd(3N).
  91.  
  92. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  93.      If successful, _a_s_r_c_m_d and _a_s_r_c_m_d_v both return a socket descriptor
  94.      attached to the remote command's _s_t_d_i_n and _s_t_d_o_u_t.  If the remote command
  95.      cannot be started, -1 is returned and _a_s_e_r_r_o_r_c_o_d_e is set appropriately.
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.